package com.ruoyi.outpatient.service.impl;

import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.outpatient.mapper.MedicalOutpatientdoctorReceiverecordMapper;
import com.ruoyi.outpatient.domain.MedicalOutpatientdoctorReceiverecord;
import com.ruoyi.outpatient.service.IMedicalOutpatientdoctorReceiverecordService;

/**
 * 接诊记录Service业务层处理
 * 
 * @author yyj
 * @date 2022-01-03
 */
@Service
public class MedicalOutpatientdoctorReceiverecordServiceImpl implements IMedicalOutpatientdoctorReceiverecordService 
{
    @Autowired
    private MedicalOutpatientdoctorReceiverecordMapper medicalOutpatientdoctorReceiverecordMapper;

    /**
     * 查询接诊记录
     * 
     * @param opdoctorreceiverecordid 接诊记录主键
     * @return 接诊记录
     */
    @Override
    public MedicalOutpatientdoctorReceiverecord selectMedicalOutpatientdoctorReceiverecordByOpdoctorreceiverecordid(String opdoctorreceiverecordid)
    {
        return medicalOutpatientdoctorReceiverecordMapper.selectMedicalOutpatientdoctorReceiverecordByOpdoctorreceiverecordid(opdoctorreceiverecordid);
    }

    /**
     * 查询接诊记录列表
     * 
     * @param medicalOutpatientdoctorReceiverecord 接诊记录
     * @return 接诊记录
     */
    @Override
    public List<MedicalOutpatientdoctorReceiverecord> selectMedicalOutpatientdoctorReceiverecordList(MedicalOutpatientdoctorReceiverecord medicalOutpatientdoctorReceiverecord)
    {
        return medicalOutpatientdoctorReceiverecordMapper.selectMedicalOutpatientdoctorReceiverecordList(medicalOutpatientdoctorReceiverecord);
    }

    /**
     * 新增接诊记录
     * 
     * @param medicalOutpatientdoctorReceiverecord 接诊记录
     * @return 结果
     */
    @Override
    public int insertMedicalOutpatientdoctorReceiverecord(MedicalOutpatientdoctorReceiverecord medicalOutpatientdoctorReceiverecord)
    {
        medicalOutpatientdoctorReceiverecord.setOpdoctorreceiverecordid(new Date().getTime()+"");
        medicalOutpatientdoctorReceiverecord.setCreateTime(DateUtils.getNowDate());
        return medicalOutpatientdoctorReceiverecordMapper.insertMedicalOutpatientdoctorReceiverecord(medicalOutpatientdoctorReceiverecord);
    }

    /**
     * 修改接诊记录
     * 
     * @param medicalOutpatientdoctorReceiverecord 接诊记录
     * @return 结果
     */
    @Override
    public int updateMedicalOutpatientdoctorReceiverecord(MedicalOutpatientdoctorReceiverecord medicalOutpatientdoctorReceiverecord)
    {
        return medicalOutpatientdoctorReceiverecordMapper.updateMedicalOutpatientdoctorReceiverecord(medicalOutpatientdoctorReceiverecord);
    }

    /**
     * 批量删除接诊记录
     * 
     * @param opdoctorreceiverecordids 需要删除的接诊记录主键
     * @return 结果
     */
    @Override
    public int deleteMedicalOutpatientdoctorReceiverecordByOpdoctorreceiverecordids(String[] opdoctorreceiverecordids)
    {
        return medicalOutpatientdoctorReceiverecordMapper.deleteMedicalOutpatientdoctorReceiverecordByOpdoctorreceiverecordids(opdoctorreceiverecordids);
    }

    /**
     * 删除接诊记录信息
     * 
     * @param opdoctorreceiverecordid 接诊记录主键
     * @return 结果
     */
    @Override
    public int deleteMedicalOutpatientdoctorReceiverecordByOpdoctorreceiverecordid(String opdoctorreceiverecordid)
    {
        return medicalOutpatientdoctorReceiverecordMapper.deleteMedicalOutpatientdoctorReceiverecordByOpdoctorreceiverecordid(opdoctorreceiverecordid);
    }
}
